package com.company;

import java.util.Arrays;
import java.util.Scanner;

/**
 * @author jrue
 * @version 1.0
 * @date 2020/3/19 19:47
 */
public class Main17 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        int m = sc.nextInt();
        int p = sc.nextInt();
        int q = sc.nextInt();
        int[] task = new int[k];

        for (int i = 0; i < task.length; i++) {
            task[i] = sc.nextInt();
        }
        Arrays.sort(task);
        int count = 0;
        int tempM = m;
        int tempCount = 0;
        for (int i = 0; i < task.length; i++) {
            for (int j = 0; j < n; j++) {
                if (tempM >= task[i]) {
                    tempM -= task[i];
                    tempCount += p;
                }
            }
        }
        
        for (int i = 0; i < n; i++) {
            boolean over = true;
            if (task[0] > m) break;
            for (int j = 0; j < task.length; j++) {
                if (m >= task[j]) {
                    m -= task[j];
                    count += p;
                }else {
                    over = false;
                }
            }
            if (over) count += q;
        }

        System.out.println(Math.max(count,tempCount));
    }

}
